(function (doc) {
    let docEl = doc.documentElement
    doc.addEventListener('DOMContentLoaded',recalc)

    function recalc(){
        let width = docEl.clientWidth
        docEl.style.fontsize = 20 * (width / 320) + 'px'
    }
})(document)